<template>
  <div class="qrCode xms-flex-wrap">
    <div class="xms-flex-middle flex-column justify-content-center align-items-center">
      <vue-qr style="width: 250px" :logoSrc="head" :text="link" :logoScale="0.2"></vue-qr>
      <div class="flex-column align-items-center pb-10 font-14 bg-white" style="width: 250px">
        <div>奖励发放规则</div>
        <div class="mt5">分销奖励：完成订单实时发放</div>
        <div>销售奖励：每周周一进行发放</div>
        <div>团队奖励：每月一号进行发放</div>
        <div style="color: #ff6f00;background: white;width: 250px;text-align: center;font-size:12px;margin-top: 10px">(二维码可长按保存，支持右上角分享)</div>
      </div>
    </div>
  </div>
</template>
<script>
  import vueQr from 'vue-qr'
  export default {
    name: "QrCode",
    data() {
      return {
        url:{
          codes:this.axiosUrl+'users/codes'
        },
        head:'',
        link:''
      }
    },
    components: {
      vueQr
    },
    mounted(){
      let _this=this;
      _this.$wxConfig.share(this.$route.path)
      _this.codes()
    },
    methods:{
      codes(){
        let _this=this;
        _this.$http.post(_this.url.codes,{},(res)=>{
          _this.head=res.head;
          _this.link=res.link
        })
      }
    }
  };
</script>
<style lang="stylus" scoped>
  .xms-flex-wrap
    height calc(100vh - 50px)
</style>
